<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">

<title> 提交记录 9729 - Judge Duck Online </title>

<link rel="icon" type="image/png" href="/images/judgeduck-logo-small.png" />

<script src="/libs/js/jquery-3.2.1.min.js"></script>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="/libs/css/bootstrap.min.css" />

<!-- Latest compiled and minified JavaScript -->
<script src="/libs/js/bootstrap.min.js"></script>

<link rel="stylesheet" type="text/css" href="/css/main.css" />
<link rel="stylesheet" href="/css/non-responsive.css" type="text/css" />

<script src="/js/md5.js"></script>
<script src="/js/judgeduck.js"></script>

<script type="text/x-mathjax-config">
	MathJax.Hub.Config({
		showProcessingMessages: false,
		tex2jax: {
			inlineMath: [["$", "$"], ["\\\\(", "\\\\)"]],
			processEscapes:true
		},
		menuSettings: {
			zoom: "Hover"
		}
	});
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>

</head>

<body onload="">

<!-- Fixed navbar -->
<nav class="navbar navbar-default" role="navigation" style="background-color: #eeeeee">
	<div class="container">
		<div class="navbar-header">
			<div class="navbar-brand">
				<a href="/">
					<img src="/images/judgeduck-logo.png" width="40px" height="40px" style="margin:-10px" />
				</a>
			</div>
			<font class="navbar-brand">
				Judge Duck Online
			</font>
		</div>
		<div class="navbar-collapse collapse">
			<ul class="nav navbar-nav">
				<li class="nav-item">
					<a class="nav-link" href="/index/index.html"> 首页 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/problems/index.html"> 题目列表 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/submissions/index.html"> 提交记录 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/blogs/index.html"> 博客 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/faq/index.html"> FAQ </a>
				</li>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<li class="nav-item">
					<a class="nav-link" href="/user/login/index.html"> 登录 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/user/register/index.html"> 注册 </a>
				</li>
			</ul>
		</div><!--/.nav-collapse -->
	</div>
</nav>




<div id="main_div" class="container" style="padding-left: 25px; padding-right: 25px">
	<h2> 提交记录 9729 </h2>
	<hr />
	
	<div class="row">
		<div class="col-xs-12">
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-2"> 用户 </th>
					<th class="col-xs-3"> 题目 </th>
					<th class="col-xs-2"> 状态 </th>
					<th class="col-xs-1"> 得分 </th>
					<th class="col-xs-1"> 用时 </th>
					<th class="col-xs-1"> 内存 </th>
					<th class="col-xs-1"> 语言 </th>
					<th class="col-xs-1"> 代码长度 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> <a href='/user/profile/memset0/index.html'> memset0 </a> </td>
<td> <a href='/problem/1002i/index.html'> 1002i. 【模板题】多项式乘法 </a> </td>
<td> Compile Error </td>
<td> 0 </td>
<td style='font-size:13px'> 0 ns </td>
<td style='font-size:13px'> 0 KB </td>
<td style='font-size:13px'> C++ </td>
<td style='font-size:13px'> 3.97 KB </td>
				</tr>
			</table>
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-6"> 提交时间 </th>
					<th class="col-xs-6"> 评测时间 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> 2019-07-08 15:27:54 </td>
<td style='font-size:13px'> 2019-07-08 15:27:55 </td>
				</tr>
			</table>
			<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/styles/tomorrow.min.css">
			<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/highlight.min.js"></script>
			<script>hljs.initHighlightingOnLoad();</script>
			<div class="row">
				<label for="code"> 代码 </label>
				<pre style="background-color:white"><code class="cpp">// =================================
//   author: memset0
//   date: 2019.07.07 23:10:06
//   website: https://memset0.cn/
// =================================
#include &lt;bits/stdc++.h&gt;
#define ll long long
#define rep(i, l, r) for (int (i) = (l), __lim = (r); (i) &lt;= __lim; (i)++)
#define for_each(i, a) for (size_t i = 0, __lim = a.size(); i &lt; __lim; ++i)
namespace ringo {

template &lt;class T&gt; inline void read(T &amp;x) {
  x = 0; char c = getchar(); bool f = 0;
  while (!isdigit(c)) f ^= c == &#x27;-&#x27;, c = getchar();
  while (isdigit(c)) x = x * 10 + c - &#x27;0&#x27;, c = getchar();
  if (f) x = -x;
}
template &lt;class T&gt; inline void print(T x) {
  if (x &lt; 0) putchar(&#x27;-&#x27;), x = -x;
  if (x &gt; 9) print(x / 10);
  putchar(&#x27;0&#x27; + x % 10);
}
template &lt;class T&gt; inline void print(T x, char c) { print(x), putchar(c); }
template &lt;class T&gt; inline void print(T a, int l, int r, std::string s = &quot;&quot;) {
  if (s != &quot;&quot;) std::cout &lt;&lt; s &lt;&lt; &quot;: &quot;;
  for (int i = l; i &lt;= r; i++) print(a[i], &quot; \n&quot;[i == r]);
}

const int N = 1e6 + 10, mod = 998244353;
int n, m;

inline void dec_up(int &amp;a, int b) { a -= b; if (a &lt; 0) a += mod; }
inline void inc_up(int &amp;a, int b) { a += b; if (a &gt;= mod) a -= mod; }
inline void mul_up(int &amp;a, int b) { a = static_cast&lt;ll&gt;(a) * b % mod; }
inline int dec(int a, int b) { a -= b; return a &lt; 0 ? a + mod : a; }
inline int inc(int a, int b) { a += b; return a &gt;= mod ? a - mod : a; }
inline int mul(int a, int b) { return static_cast&lt;ll&gt;(a) * b % mod; }
inline int inv(int x) { return x &lt; 2 ? 1 : mul(mod - mod / x, inv(mod % x)); }
inline int fpow(int a, int b) { int s = 1; for (; b; b &gt;&gt;= 1, mul_up(a, a)) if (b &amp; 1) mul_up(s, a); return s; }

struct poly : std::vector&lt;int&gt; {
  using std::vector&lt;int&gt;::vector;
  inline void in() { for (auto &amp;x : *this) read(x); }
  inline void out() const { for (auto x : *this) print(x, &#x27; &#x27;); putchar(&#x27;\n&#x27;); }
} f, g;

int w[N &lt;&lt; 2], rev[N &lt;&lt; 2];
int init(int len) {
  int lim = 1, k = 0; while (lim &lt; len) lim &lt;&lt;= 1, ++k;
  for (int i = 0; i &lt; lim; i++) rev[i] = (rev[i &gt;&gt; 1] &gt;&gt; 1) | ((i &amp; 1) &lt;&lt; (k - 1));
  static int base_len = 1;
  for (int len = base_len, wn; len &lt; lim; base_len = len &lt;&lt;= 1) {
    wn = fpow(3, (mod - 1) / (len &lt;&lt; 1)), w[len] = 1;
    for (int i = 1; i &lt; len; i++) w[i + len] = mul(w[i + len - 1], wn);
  } return lim;
}

void dft(poly &amp;a, int lim) {
  a.resize(lim);
  for (int i = 0; i &lt; lim; i++) if (i &lt; rev[i]) std::swap(a[i], a[rev[i]]);
  if (lim &gt; 1) {
    for (int i = 0; i &lt; lim; i += 2) {
      int x = a[i], y = a[i + 1];
      a[i] = inc(x, y), a[i + 1] = dec(x, y);
    }
  }
  if (lim &gt; 2) {
    for (int i = 0; i &lt; lim; i += 4) {
      int x = a[i], y = mul(w[2], a[i + 2]);
      a[i] = inc(x, y), a[i + 2] = dec(x, y);
      x = a[i + 1], y = mul(w[3], a[i + 3]);
      a[i + 1] = inc(x, y), a[i + 3] = dec(x, y);
    }
  }
  for (int len = 4; len &lt; lim; len &lt;&lt;= 1)
    for (int i = 0; i &lt; lim; i += (len &lt;&lt; 1)) {
      int t0, t1, t2, t3;
      int *f = &amp;a[i], *g = &amp;a[i + len], *p = &amp;w[len], *end = &amp;w[len &lt;&lt; 1];
      while (p &lt; end) {
        t0 = mul(*p, *g), *g = dec(*f, t0), inc_up(*f, t0);
        t1 = mul(*(p + 1), *(g + 1)), *(g + 1) = dec(*(f + 1), t1), inc_up(*(f + 1), t1);
        t2 = mul(*(p + 2), *(g + 2)), *(g + 2) = dec(*(f + 2), t2), inc_up(*(f + 2), t2);
        t3 = mul(*(p + 3), *(g + 3)), *(g + 3) = dec(*(f + 3), t3), inc_up(*(f + 3), t3);
        f += 4, g += 4, p += 4;
      }
    }
}

void idft(poly &amp;a, int lim) {
  a.resize(lim), std::reverse(&amp;a[1], &amp;a[lim]);
  dft(a, lim); int inv_lim = inv(lim);
  for (int i = 0; i &lt; lim; i++) mul_up(a[i], inv_lim);
}

poly mul(const poly &amp;f, const poly &amp;g, int len = -1) {
  static poly a, b; a = f, b = g;
  int lim = init(f.size() + g.size() - 1);
  dft(a, lim), dft(b, lim);
  for (int i = 0; i &lt; lim; i++) mul_up(a[i], b[i]);
  idft(a, lim); a.resize(~len ? len : f.size() + g.size() - 1);
  return a;
}

void main() {
  read(n), read(m), f.resize(n + 1), g.resize(m + 1);
  f.in(), g.in(), mul(f, g).out();
}

} signed main() {
#ifdef memset0
  freopen(&quot;1.in&quot;, &quot;r&quot;, stdin);
#endif
  return ringo::main(), 0;
}</code></pre>
				<br />
				
				<label for="result"> 评测结果 </label><div class="row"><div class="col-xs-12"><div class="alert alert-danger"><div class="text-center row"><table class="table table-borderless" style="margin:0px"><tr><td class="col-xs-2" style="vertical-align:middle;padding-left:20px;padding-right:20px"><b>Compilation</b></td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">Compile Error</td><td class="col-xs-2" style="vertical-align:middle">Score: N/A</td><td class="col-xs-2" style="vertical-align:middle"><a data-toggle="collapse" href="#detail_1" aria-expanded="false" aria-controls="detail_1">显示更多</a></td></tr></table></div><div class="collapse" id="detail_1"><br /><textarea class="form-control" style="background-color: white" rows="8" readonly>Compiling...
Contestant compile error
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp:42:27: warning: inheriting constructors only available with -std=c++11 or -std=gnu++11
   using std::vector&lt;int&gt;::vector;
                           ^
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp: In member function ‘void ringo::poly::in()’:
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp:43:33: error: ISO C++ forbids declaration of ‘x’ with no type [-fpermissive]
   inline void in() { for (auto &amp;x : *this) read(x); }
                                 ^
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp:43:37: warning: range-based ‘for’ loops only available with -std=c++11 or -std=gnu++11
   inline void in() { for (auto &amp;x : *this) read(x); }
                                     ^
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp: In member function ‘void ringo::poly::out() const’:
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp:44:39: error: ‘x’ does not name a type
   inline void out() const { for (auto x : *this) print(x, &#x27; &#x27;); putchar(&#x27;\n&#x27;); }
                                       ^
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp:44:65: error: expected ‘;’ before ‘putchar’
   inline void out() const { for (auto x : *this) print(x, &#x27; &#x27;); putchar(&#x27;\n&#x27;); }
                                                                 ^
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp:44:80: error: expected primary-expression before ‘}’ token
   inline void out() const { for (auto x : *this) print(x, &#x27; &#x27;); putchar(&#x27;\n&#x27;); }
                                                                                ^
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp:44:80: error: expected ‘)’ before ‘}’ token
jp_data/tasks/e680e7d2a15111e9899e00163e04388b/contestant.cpp:44:80: error: expected primary-expression before ‘}’ token
</textarea></div></div></div></div>
			</div>
		</div>
	</div>

	<hr />
	
	<div class="row">
		<p style="text-align: center; color: #888">
			Judge Duck Online | 评测鸭在线 <br />
			Server Time: 2019-08-02 17:16:19 | Loaded in 1 ms | <a href="/status/index.html"> Server Status </a>
<a class="f698c2eaa31040d881d21a22b67073c5" href="http://www.iis7.com" id="f698c2eaa31040d881d21a22b67073c5" target="_blank" style="display:inline-block;background-color:;color:#fff;padding:2px 5px;font-family:arial;font-size:12px;font-weight:bold;" >iis7站长之家</a> <br />
			个人娱乐项目，仅供学习交流使用
		</p>
	</div>
</div>

</body>

</html>
